package com.slofzx.nuoda.evaluation.project.enums;

import com.slofzx.nuoda.common.EnumConfig;
import com.slofzx.nuoda.common.config.Type;

/**
 * 上报版本审核结果
 * @author sunfuyong
 */
@EnumConfig(id="report-audit-result",name = "上报版本审核结果")
public enum ReportAuditResultEnum implements Type {

    AUDIT("audit","待审"),
    PASS("pass","通过"),
    REJECT("reject","退回");
    /**
     * 数据类型id
     */
    private String id;
    /**
     * 数据类型展示名称
     */
    private String name;
    ReportAuditResultEnum(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    /**
     * 根据id获取对应的枚举
     * @param id 枚举值的标识
     * @return
     */
    public static ReportAuditResultEnum getEnum(String id){
        for(ReportAuditResultEnum dataTypeEnum: ReportAuditResultEnum.values()){
            if(dataTypeEnum.getId().equals(id)){
                return dataTypeEnum;
            }
        }
        return null;
    }
}
